<template>
  <div class="header">

    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>

<!--    <router-link to="/index"  class="header-input">-->
      <div   class="header-input">
        <span class="iconfont">&#xe632;</span>
        输入城市/景点/游玩主题
      </div>
<!--    </router-link>-->

    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont arrow-icon">&#xe64a;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
  import {mapState} from 'vuex'

  export default {
    name: 'HomeHeader',
    computed: {
      ...mapState(['city'])
    }

  }
</script>

<style scoped lang="stylus" type="text/stylus" rel="stylesheet/stylus">
  @import '~styles/varibles.styl';
  .header
    display flex
    background-color $bgColor
    line-height $headerHeight
    color white

    .header-left
      width 0.32rem
      float left
      margin-right 0.02rem

      .back-icon
        text-align center
        font-size 0.2rem

    .header-input
      background-color white
      border-radius 0.05rem
      margin-top 0.06rem
      margin-bottom 0.06rem
      height 0.32rem
      text-align center
      line-height 0.32rem
      flex 1
      color #ccc

    .header-right
      color white
      margin-left 0.1rem
      margin-right 0.05rem

      .arrow-icon
        font-size: .12rem
        text-align center

</style>
